package com.googlecode.groovy_toy_orm.framework


import org.apache.log4j.AppenderSkeleton
import org.apache.log4j.Layout
import org.apache.log4j.spi.LoggingEvent
import org.testng.Reporter

/**
 * @author: DavydovMD
 * Date: 16.05.13
 * Time: 11:36
 */
class TestNGAppender extends AppenderSkeleton {
    public TestNGAppender(){
        super()
    }

    public TestNGAppender(Layout layout) {
        super()
        setLayout(layout);
    }

    @Override
    protected void append(LoggingEvent event) {
        Reporter.log(this.layout.format(event))
    }

    @Override
    void close() {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    boolean requiresLayout() {
        return true
    }
}
